import asyncio
from util import delay, async_timed
from PyCmpltrtok.common import sep
import time


@async_timed()
async def call_later():
    print("I'm being called in the future!")
    await delay(2, 'call_later', 0.2)
    print('call_later done.')
    
    
def main():
    sep('Will get_event_loop')
    loop = asyncio.get_event_loop()
    print('Gotten running loop, will run_until_complete')
    loop.run_until_complete(call_later())
    print('run_until_complete invoked')
    print('Sleep 1')
    time.sleep(1)
    
    
if '__main__' == __name__:
    main()
    